package io.renren.modules.app.controller;

import io.renren.common.utils.PageData;
import io.renren.common.utils.R;
import io.renren.modules.carinfo.service.CarInfoService;
import io.renren.modules.carinfo.vo.CarInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 车辆信息表
 */
@Api(tags = "车辆信息表")
@RestController
@RequestMapping("/app")
public class AppCarInfoController {
    @Autowired
    private CarInfoService carInfoService;

    /**
     * 车辆信息表(分页)
     */
    @ApiOperation("车辆信息表(分页)")
    @GetMapping("/carinfolist")
    public R list(@RequestParam Map<String, Object> params){
        params.put("status",1);
        PageData<CarInfoVO> pageData = carInfoService.queryCarInfoPage(params);
        return R.ok().put("page", pageData);
    }
}
